package router

import (
	"github.com/labstack/echo/v4"
	"longmen/server/internal/api"
)

func initChatRoute(group *echo.Group, base api.Controller, authFunc echo.MiddlewareFunc) {
	//腾讯IM
	group.POST("/tencentIm/getUserSig", base.GetUserSig, authFunc)         // 获取登陆凭证
	group.POST("/tencentIm/callback", base.Callback)                       // IM回調接口
	group.POST("/tencentIm/setOfflinePush", base.SetOfflinePush, authFunc) // 離線推送設定
	group.POST("/tencentIm/getOfflinePush", base.GetOfflinePush, authFunc)

	//群聊
	group.POST("/groupChat/getAnchorProfile", base.GetAnchorProfile, authFunc)
	group.POST("/groupChat/delMsg", base.DelMsg, authFunc)
	group.POST("/groupChat/revokeMsg", base.RevokeMsg, authFunc)
	group.POST("/groupChat/banUser", base.BanUser, authFunc)
	group.POST("/groupChat/kickUser", base.KickUser, authFunc)
	group.POST("/groupChat/getGroupInfo", base.GetGroupInfo, authFunc)
	group.POST("/groupChat/clearHistory", base.ClearHistory, authFunc)
	group.POST("/groupChat/clearAndQuit", base.ClearAndQuit, authFunc)
	group.POST("/groupChat/addToGroupChat", base.AddToGroupChat, authFunc)
	group.POST("/groupChat/getGroupMembers", base.GetGroupMembers, authFunc)
	group.POST("/groupChat/getChatList", base.GetChatList, authFunc)
	group.POST("/groupChat/getHistory", base.GetHistory, authFunc)
	group.POST("/groupChat/getBanInfo", base.GetBanInfo, authFunc)
	group.POST("/groupChat/cancelBanUser", base.CancelBanUser, authFunc)
	group.POST("/groupChat/read", base.Read, authFunc)

	//mgrChat
	group.POST("/mgrChat/getHistory", base.GetMgrChatHistory, authFunc)
	group.POST("/mgrChat/delHistory", base.DelMgrChatHistory, authFunc)
	group.POST("/mgrChat/delChat", base.DelMgrChat, authFunc)
	group.POST("/mgrChat/read", base.MgrChatRead, authFunc)

	//privateChat
	group.POST("/privateChat/getRecord", base.GetPrivateChatRecord, authFunc)             //我的-私聊记录页面
	group.POST("/privateChat/getRecordDetail", base.GetPrivateChatRecordDetail, authFunc) //我的-私聊记录页面-详情
	group.POST("/privateChat/delRecord", base.DeletePrivateChatRecord, authFunc)          //我的-私聊记录页面-详情
	group.POST("/privateChat/unreadMsg", base.UnreadMsg, authFunc)                        //未读消息
	group.POST("/privateChat/read", base.ReadRecord, authFunc)                            //未读消息

	group.POST("/imlogin/record", base.ImLoginRecord)
}
